<%@ page language="java" pageEncoding="UTF-8"
	contentType="text/html;charset=UTF-8"%>
<% 
String basePath = request.getContextPath()+"/"; 
%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
	<div class="wrapper wrapper-content animated fadeInRight"
		style="padding-bottom: 0px">
		<div class="row">
			<div class="col-sm-12" id="renwu">
				<div class="ibox float-e-margins">
					<div class="ibox-content">
						<form id="search-form3" role="form" class="form-inline">
							<div class="form-group col-sm-3 col-md-3">
								<label>源系统:</label> <input type="text" class="form-control"
									name="srcSys" id="srcSys3"
									style="height: 25px; width: 180px">
							</div>
							<div class="form-group col-sm-3 col-md-3">
									<label >源代码:</label>
									<input type="text" name="srcCode" id="srcCode3" class="form-control" style="height:25px;width:180px">
							</div>
							
							<div class="form-group col-sm-3 col-md-3">
								<label >源代码名称:</label>
								<input type="text" name="srcCodeName" id="srcCodeName3" class="form-control" style="height:25px;width:180px">
							</div>
							<div class="form-group col-sm-3 col-md-3">
								<button class="btn btn-info" type="button" id="ok3">查询</button>
								&nbsp;&nbsp;&nbsp;&nbsp;
								<button class="btn btn-info" id="empty3" type="button">清空</button>
							</div>
						</form>
						<br> <br>
						<div class="row row-lg">
							<div class="col-sm-12 col-md-12 col-lg-12">
								<!-- Example Events -->
								<div class="example-wrap">
									<div class="example bootstrap-table" id="list-page">
										<table id="table3" style="font-size: 11px;">
										</table>
									</div>
								</div>
								<!-- End Example Events -->
							</div>
						</div>
					</div>
				</div>
			</div>
		</div>
	</div>



	<script>
	$(function(){
		var $table = $('#table3');
		    $table.bootstrapTable({
		    url:"<%=basePath%>rest/codemanager/system/list",
	    	iconSize:'sm',
			cache: false,
			height:200,
			stickyHeader: true,
			singleSelect:false,
			clickToSelect:false,
			striped : true,
			pagination : true, 
			pageNumber : 1,//首页页码
			pageSize : 5,//页面显示条数
			pageList : [5, 10, 20, 30 ],
			sidePagination : 'server',//服务器端分页
			columns : [
			    {radio : true}, 
			    {field:"srcSys",title : "源系统",cellStyle:function(value, row, index, field){return {css: {"border": "0px"}}}},
				{field:"srcCode",title : "源代码",cellStyle:function(value, row, index, field){return {css: {"border": "0px"}}}},
				{field:"srcCodeName",title : "源代码名称",cellStyle:function(value, row, index, field){return {css: {"border": "0px"}}}},
				],
				contentType : "application/x-www-form-urlencoded",
				queryParamsType : "limit",
				dataType : "json",
				method : "post",
				queryParams : function(params){
					return params;
				}
		});
		
		
		$.each($('table3'),function(i, table){
			if($(table).attr('id') != undefined){
				try {
					$(table).bootstrapTable('resetView', {height: $(window).height()-$(".bootstrap-table").offset().top-150});
				} catch (e) {
				}
			}
	    })
		
		//清空事件
		$("#empty3").click(function(){
			$("#search-form3")[0].reset();
		})
		

		//模糊查询
		$("#ok3").click(function(){
			//获得表单内容
			var params = jQuery("#search-form3").serializeJson();
			$("#table3").bootstrapTable("refresh", {query: params});
		});
		

	});

</script>